home *** CD-ROM | disk | FTP | other *** search
/ Hackers Matrix / Hacker's Matrix (nCite Software) (2003).iso / Tutorials / hTut_0015.txt < prev    next >
Text File  |  2002-12-13  |  7KB  |  124 lines

  1.                     
  2.             ******************************************************
  3.             *Create a lightweight E-Mailer (level= Script Kiddie)*
  4.             ******************************************************
  5.  
  6.  
  7.  
  8. First of all; the disclaimer:
  9. -----------------------------
  10.  
  11. The information in this article is 'as is' and the author can't be held responsible for any activities iof others. 
  12. Spawning mail under someone elses name is illegal in most countries and re-using someone elses 
  13. code is theft. This text was written so that this still wide spread ptroblem gets a little more well known thus forcing 
  14. webmasters to take another look at their code.
  15.  
  16.  
  17. This out of the way; What is in this text:
  18. ------------------------------------------
  19.  
  20. Well it will explain a little trick that will allow you to use webservers as a mailserver, enabling you to send anonymous
  21. mail. This doesn't involve you writing a complex program and reading true the SMTP man pages (although that wouldn't
  22. be a waste of time), all you will need is a browser.
  23.  
  24.  
  25. How do we do that then: HTML
  26. ----------------------------
  27.  
  28. What we are going to use to build our mailng thingy is HTML (plain old HyperText Markup Language). Some basic things you
  29. should learn before you continue reading:
  30.  
  31.     - HTML is build up with tags, that mark the beginning and ending of code blocks
  32.         Each page starts with the <HTML> tag and ends with </HTML>
  33.         The page is then devided in a HEAD and a body, with the <HEAD> </HEAD> and <BODY> </BODY> tags
  34.         e.g.
  35.             <HTML>
  36.                 <HEAD>
  37.                   <TITLE>The title of my page</TITLE>
  38.                 </HEAD>
  39.                 <BODY>
  40.                   this text will be displayed on your page
  41.                 </BODY>
  42.     - besides these basic tags you also have the <FORM></FORM> tags, between these two you create a form ( a block of
  43.         html code that is considered as a whole.) Now, each part in a page has some parameters the <BODY> for 
  44.         example can have a backgroundcolor, these parameters are stated behind the opening tag of a block
  45.             e.g. <BODY BGCOLOR="black" BGSOUND="http://www.wavs.org/loonytune.wav">
  46.                     My page
  47.                  </BODY>
  48.  
  49.      a form can be given some parameters as well
  50.         
  51.         <FORM ACTION="http://provider.com/php/callme.php/" METHOD="POST">
  52.             
  53.        the action parameter is the script that will be used to handle all those variables (<INPUT></INPUT>) in the form
  54.        and METHOD is POST or GET, POST means sending the variables to the action script and letting it run from there
  55.        on end. GET means the variables are sent to be altered and the pages expects something in return from the
  56.            script (like a google search page GET me everything with "Fake" and "mailer")
  57.        This actionscript will be called as soon as one presses the SUBMIT button that's within the <FORM></FORM> tags.
  58.  
  59.             
  60.                     
  61.  
  62.  
  63. 'Nough crap: lets build
  64. -----------------------
  65.  
  66. We are going to build this fake mailer by using 'open code' (read crappy code) on a webserver. Many Internet Solutions 
  67. Providers re-use the same script for different clients. It is even common use that the actual scripts stay on their own
  68. servers and that the pages on the clients server are linked to it. This is what we are going to use. First of we need one 
  69. of those client's websites where we look for a CONTACT US form. Most sites have one of those so finding one shouldn't be
  70. any trouble. Once you have found one of those contact-us pages we are going to see if we can exploit it. 
  71.  
  72. To do this open the source code of the page and look for the <form> tag. What we need is a form tag that looks kinda like
  73. this <FORM ACTION="http://www.provider.com/scripts/contact.php" METHOD="POST">. Once we found this tag we need to look 
  74. at the lines beneath it. Many of these pages call a script (the one thats labeled ACTION in the form tag) and send a load
  75. of variables to it (method="POST"). NOw we have to look for a variable that states the recipients email. 
  76. e.g. <INPUT TYPE='HIDDEN' NAME="EMAIL" value="sales@client.com">
  77. So here we see that one of the variables sent to the script is the email of the recipient. 
  78. Once you have found this you know that we can use the providers script to send our own emails.
  79.  
  80. So lets start building. First step is Downloading the entire contact page to your disk. Once downloaded we are going to 
  81. build our lightweight mailer. Go to the downloaded page and open it with a text editor. Once opened look for the input tag
  82. with the recipients adress again. Now set the TYPE property to 'TEXT' and save the page.
  83. Open the altered page in your browser.
  84. You will see that at new textbox has appeared with the recipients email. Now you can type in the email of the person you wish 
  85. to send an email and fill in the other boxes. Press  SUBMIT or SEND or whatever they called the button and your email is on 
  86. its way.
  87. There, you build a mail program within a minute.
  88.  
  89. Most of those scripts are proteced so that you can't post the altered page on your own webserver and run it from their 
  90. (domain checking), but using the altered page from your own pc can't be blocked.
  91.  
  92.  
  93. Another common feature of those re-usable scripts is that they read all the variables in the page and put it in the mail.
  94. So you can create your own <input> values and delete those you don't need, this way you can create a mail that suits your
  95. needs a little more. 
  96.  
  97. Note: Most scripts send the mail in lear text format (bye bye virii)
  98.  
  99.  
  100.  
  101. Workarounds: How do I prevent people from reusing my script?
  102. ------------------------------------------------------------
  103.  
  104. Instead of using an html page as contact form, use a client side script that will only display the contact form if a 
  105. the HTML_REFERER is on your domain. Or you can put all client-side variables in a client side script that functions as a 
  106. buffer between your contact-script and the page, thus making sure that the home-user only gets to see the variables that he
  107. actually needs to fill in.
  108.  
  109.  
  110.  
  111. FIn
  112. ---
  113.  
  114. See, that wasn't to hard. Now go find yourself a place to practice.
  115.  
  116.  
  117.  
  118.  
  119. ****************************************************************************************************************************
  120. ----------------------------------------------------Created by Crim3--------------------------------------------------------
  121. ****************************************************************************************************************************
  122. ***************************************************| www.HACK3Z.com |*******************************************************
  123. ****************************************************************************************************************************
  124.